package chapter;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class FileTest {
	
	public void test() throws IOException{
		FileInputStream fis=new FileInputStream("D:\\aa.txt");
		InputStreamReader isr=new InputStreamReader(fis,"Unicode");
		BufferedReader br=new BufferedReader(isr);
		String str;
		StringBuilder sb=new StringBuilder();
		while((str=br.readLine())!=null)
		{
			sb.append(str);
		}
	   System.out.println(sb);
	}
	
public static void main(String[]args) throws IOException{
	FileTest ft=new FileTest();
	ft.test();
	
}

}
